<template>
 <div style="height:100%;">
   <!-- <view-box ref="viewBox"> -->

    <transition name="slide-fadef">
      <router-view class="cContentVue"></router-view>
    </transition>

  <tabbar class="headerbott">
    <tabbar-item :selected=" routname=='home'" link="/" > <i slot="icon"  class="icons iconfont">&#xe698;</i>
      <span slot="label">首页</span>
    </tabbar-item>

    <tabbar-item :selected=" routname=='information'"  link="/home/information"> <i slot="icon"  class="icons iconfont">&#xe64d;</i>
      <span slot="label">发现</span>
    </tabbar-item>

    <tabbar-item  :selected=" routname=='message'" badge="2" link="/home/message" >
      <i slot="icon"  class="icons iconfont">&#xe601;</i>
      <span slot="label">消息中心</span>
    </tabbar-item>

    <tabbar-item :selected=" routname=='personage'"  link="/home/personage"  >
      <i slot="icon"  class="icons iconfont">&#xe61c;</i>
      <span slot="label">个人中心</span>
    </tabbar-item>
  </tabbar>

   <!-- </view-box> -->
 </div>

<!--   <div>
    <transition name="slide-fadef">
      <router-view class="cContentVue"></router-view>
    </transition>

  <tabbar class="headerbott">
    <tabbar-item :selected=true link="/" > <i slot="icon"  class="icons iconfont">&#xe698;</i>
      <span slot="label">首页</span>
    </tabbar-item>

    <tabbar-item link="/home/information"> <i slot="icon"  class="icons iconfont">&#xe64d;</i>
      <span slot="label">发现</span>
    </tabbar-item>

    <tabbar-item badge="2" link="/home/message" >
      <i slot="icon"  class="icons iconfont">&#xe601;</i>
      <span slot="label">消息中心</span>
    </tabbar-item>

    <tabbar-item  link="/home/personage"  >
      <i slot="icon"  class="icons iconfont">&#xe61c;</i>
      <span slot="label">个人中心</span>
    </tabbar-item>
  </tabbar>

</div> -->
</template>

<script>
import { Tabbar, TabbarItem,ViewBox } from 'vux'

export default {
  components: {
  Tabbar,
  TabbarItem,ViewBox
  },
  data () {
    return {
      routname:"home"
    }
  },
  methods: {
    load(){
      this.$store.dispatch('setLoading', true);
    }
  },
  mounted () {
    this.$nextTick(function() {
      // alert("f")
    var _this=this;
    // console.log(this.$store)
    var routname=this.$route.path.substring(1,this.$route.path.length);
    // console.log(routname.substring(5,routname.length))
    this.routname=routname.indexOf("/")>0?routname.substring(5,routname.length):"home"
    // this.$router.push('/home/')

    })
  }
}
</script>
<style lang="scss"  scoped>
.headerbott {
  position: fixed!important;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000000;
}

</style>
